class RatingSubmittedsController < ApplicationController
  # GET /rating_submitteds
  # GET /rating_submitteds.xml
  def index
    @rating_submitteds = RatingSubmitted.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @rating_submitteds }
    end
  end

  # GET /rating_submitteds/1
  # GET /rating_submitteds/1.xml
  def show
    @rating_submitted = RatingSubmitted.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @rating_submitted }
    end
  end

  # GET /rating_submitteds/new
  # GET /rating_submitteds/new.xml
  def new
    @rating_submitted = RatingSubmitted.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @rating_submitted }
    end
  end

  # GET /rating_submitteds/1/edit
  def edit
    @rating_submitted = RatingSubmitted.find(params[:id])
  end

  # POST /rating_submitteds
  # POST /rating_submitteds.xml
  def create
    @rating_submitted = RatingSubmitted.new(params[:rating_submitted])

    respond_to do |format|
      if @rating_submitted.save
        flash[:notice] = 'RatingSubmitted was successfully created.'
        format.html { redirect_to(@rating_submitted) }
        format.xml  { render :xml => @rating_submitted, :status => :created, :location => @rating_submitted }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @rating_submitted.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /rating_submitteds/1
  # PUT /rating_submitteds/1.xml
  def update
    @rating_submitted = RatingSubmitted.find(params[:id])

    respond_to do |format|
      if @rating_submitted.update_attributes(params[:rating_submitted])
        flash[:notice] = 'RatingSubmitted was successfully updated.'
        format.html { redirect_to(@rating_submitted) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @rating_submitted.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /rating_submitteds/1
  # DELETE /rating_submitteds/1.xml
  def destroy
    @rating_submitted = RatingSubmitted.find(params[:id])
    @rating_submitted.destroy

    respond_to do |format|
      format.html { redirect_to(rating_submitteds_url) }
      format.xml  { head :ok }
    end
  end
end
